﻿using System.Collections.Generic;

namespace NanoMvvm
{
    public class WorkspaceSelectionViewModel<T> : SelectionViewModel<T> where T : class, IWorkspace
    {
        public WorkspaceSelectionViewModel(IComparer<T> comparer = null)
            : base(comparer)
        {
            SelectionPolicy = SelectionPolicy.ExactlyOne;
        }

        protected override SelectionItemViewModel<T> CreateSelectionItem(T obj)
        {
            return new WorkspaceSelectionItemViewModel<T>(this, obj);
        }
    }
}